package org.pi.common.snippets;

object Test {
  
//  def angleAndLength(x: Double, y: Double) : (Double, Double) = {
//    return ( Math.atan2(y,x), Math.sqrt(x*x+y*y) );
//  }

  def angleAndLength(x: Float, y: Float) : (Float, Float) = {
    return ( Math.atan2(y.doubleValue(),x.doubleValue()).floatValue(), Math.sqrt((x*x+y*y).doubleValue()).floatValue() );
  }

  def main(args: Array[String]) {
	println("Hello World")
 	println("angleAndLength = "+angleAndLength(1,1))
  }
}